package com.example.s01_helloworld;

import lombok.Setter;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
@Setter
class S01HelloworldApplicationTests {


    // DI 依赖注入:
    // @Value
    // @AutoWired

    @Value("${example.title}")
    private String title;
    @Value("${example.name}")
    private String name;

    @Test
    void contextLoads() {

        System.out.println("测试代码:"+name);
        System.out.println("测试代码:"+title);
    }

}